package cn.le.beans.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;

@ApiModel(value = "JobInfoDTO",description = "")
public class JobInfoDTO {
    @ApiModelProperty(value = "任务名称",required = true)
    @NotBlank
    private String jobName;
    @ApiModelProperty(value = "应用名称",required = true)
    @NotBlank
    private String appName;
    @ApiModelProperty(value = "请求地址",required = true)
    @NotBlank
    private String url;
    @ApiModelProperty(value = "请求类型,1:post,2:get",required = true)
    @NotBlank
    private Integer requestType;
    @ApiModelProperty(value = "请求参数,post使用json格式,get使用?aa=xx的格式")
    private String param;
    @ApiModelProperty(value = "指定策略,可以使用cron表达式,也可以使用具体的时间")
    @NotEmpty
    private List<String> strategys;

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getRequestType() {
        return requestType;
    }

    public void setRequestType(Integer requestType) {
        this.requestType = requestType;
    }

    public String getParam() {
        return param;
    }

    public void setParam(String param) {
        this.param = param;
    }

    public List<String> getStrategys() {
        return strategys;
    }

    public void setStrategys(List<String> strategys) {
        this.strategys = strategys;
    }
}
